html, body {
  height: 100%;
}

body {
  padding: 0;
  margin: 0;
  background-color: #333;
  background: radial-gradient(#fff, #eee);
  display: flex;
}

.display {
  flex: 1;
  display: grid;
  grid-gap: 8px;
  max-width: 85em;
  grid-template-columns: 1fr;
  padding: 2rem;
  box-shadow: 0 4px 15px -1px rgba(0, 0, 0, 0.1);
  margin: auto;
  background-color: #f7f7f7;
  background: linear-gradient(to bottom, #fff, #f5f5f5);
}
@media (min-width: 20em) {
  .display {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 40em) {
  .display {
    grid-template-columns: repeat(2, 2fr) 1fr repeat(2, 2fr);
  }
}

.digit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-column-gap: 8px;
  grid-row-gap: 4px;
}

.digit.separator {
  display: none;
}
@media (min-width: 40em) {
  .digit.separator {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.clock {
  border-radius: 50%;
  padding-top: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  background-color: #fff;
}
.clock:nth-child(2n+1) {
  transition-delay: 0.4s;
}
.clock:before, .clock:after {
  content: "";
  display: inline-block;
  height: 45%;
  width: 4px;
  background-color: #444;
  position: absolute;
  left: 50%;
  top: 8%;
  margin-left: -2px;
  transform-origin: 2px 100%;
  transition: all 10s cubic-bezier(0.5, 0, 0.5, 1);
}
.clock.pos1:before {
  transform: rotate(90deg);
}
.clock.pos2:before {
  transform: rotate(180deg);
}
.clock.pos2:after {
  transform: rotate(90deg);
}
.clock.pos3:before {
  transform: rotate(180deg);
}
.clock.pos3:after {
  transform: rotate(270deg);
}
.clock.pos4:before {
  transform: rotate(270deg);
}
.clock.pos4:after {
  transform: rotate(360deg);
}
.clock.pos5:before {
  transform: rotate(360deg);
}
.clock.pos5:after {
  transform: rotate(540deg);
}
.clock.pos6:before {
  transform: rotate(450deg);
}
.clock.pos6:after {
  transform: rotate(630deg);
}